package com.shiyi.bean;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author wangzhanshuai
 * @date 2021/1/21 6:37 下午
 * @since 1.0
 */
public class User implements Serializable {

    private static final long serialVersionUID = 5897282852929445968L;

    private Long id;

    private String name;

    private Integer age;

    private String sex;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date birthDay;

    private Address address;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public Date getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(Date birthDay) {
        this.birthDay = birthDay;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", birthDay=" + birthDay +
                ", address=" + address +
                '}';
    }
}
